var app = getApp();

let col1H = 0;
let col2H = 0;
Page({
  data:{
    indicatorDots: false,
    autoplay: true,
    interval: 4000,
    duration: 1000
  },
  onLoad:function(){
    var that = this;
      wx.request({
          url: 'https://image.wertp.cn/api/photo/index', 
          header: {
              'content-type': 'application/json'
          },
          success: function(res) {
           var data = res.data;
            that.setData({
                banner:data.data.banner,
                nav:data.data.nav,
                });
          }
      })
  },
  getpic:function(event){
    //   console.log(event)
    var swiperid = event.currentTarget.dataset.id;
    //   console.log(swiperid);
    wx.navigateTo({
        url: '/pages/detail/detail?id='+swiperid,
    })
  },
  getnav:function(click){
    app.cid = click.currentTarget.dataset.cid;
    wx.navigateTo({
      url: '/pages/list/list?cid='+app.cid,
    })
  },
  onReady:function(){
  },
  onShow:function(){
  },
  onHide:function(){
  },
  onUnload:function(){
  },
  onPullDownRefresh: function() {
  },
  onReachBottom: function() {
  },
  onShareAppMessage: function() {
    return {
      title: 'title', // 分享标题
      desc: 'desc', // 分享描述
      path: 'path' // 分享路径
    }
  }
})